import axios from './request';
import home from './config/home';
import http from '../utils/index';
import {
  employeelogin,
  tellcode,
  contentmange,
  getcreativelv,
  appoutlink,
  tixian,
  huiyuandingdan,
} from './types/home';
export const loginText = () => http.get(home.loginText);

//获取用权限
export const get_getemployee_content_list = (user: object) =>
  http.get<employeelogin>(home.get_getemployee_content, user);

// 获取二维码
export const get_svg_captcha = () => http.post(home.get_svg_captcha);

// 获取验证码
export const get_sms_code = (tell: tellcode) =>
  http.post(home.get_send_sms, { tell });

// contentmanagement
export const get_contentmanagement = () =>
  http.get<contentmange>(home.get_contentManagement);

export const getchuangzuodengji = () =>
  http.get<getcreativelv>(home.get_getcreativelva);

export const getwailian = () => http.get<appoutlink>(home.get_appwailina);

export const gettixian = () => http.get<tixian>(home.get_tixian);

export const gethuiyuandingdan = () =>
  http.get<huiyuandingdan>(home.get_huiyuandingdan);

export const change_contentmanagement = (body) =>
  http.post(home.get_changecontent, { body });

export const get_xiaoshoue_list = () => http.get(home.get_xiaoshoue);

export const get_putongyonghu_list = () => http.get(home.get_putongyonghu);
export const delete_putongyonghu_list = (body) => http.post(home.delete_putongyonghu, { body });

export const get_chuangzuozheguanli_list = () =>
  http.get(home.get_chuangzuozheguanli);
export const delete_chuangzuozheguanli_list = (body) => http.post(home.delete_chuangzuozheguanli, { body });

export const get_pindao_list = () => http.get(home.get_pindao);

export const delete_pindao_list = (body) => http.post(home.delete_pindao, { body });

export const get_guanggao_list = () => http.get(home.get_guanggao);

export const delete_guanggao_list = (body) => http.post(home.delete_guanggao, { body });

export const get_gift_list = () => http.get(home.get_gift);

export const delete_gift_list = (body) => http.post(home.delet_gift, { body });

export const get_changshiping_list = () => http.get(home.changshiping);

export const delete_changshiping_list = (body) => http.post(home.delete_changshiping, { body });

export const get_jubaozhongxin_list = () => http.get(home.jubaozhonxin);
export const delete_jubaozhongxin_list = (body) => http.post(home.delete_jubaozhongxin, { body });

export const get_tongzhigonggao_list = () => http.get(home.tongzhigonggao);
export const delete_tongzhigonggao_list = (body) => http.post(home.delete_tongzhigonggao, { body });
export const get_department_list = () => http.get(home.department);
export const delete_department_list = (body) => http.post(home.delete_department, { body });

export const get_juese_list = () => http.get(home.juese);
export const delete_juese_list = (body) => http.post(home.delete_juese, { body });